package viper

import (
	. "gin_reptile/pkg/global"
	"github.com/spf13/viper"
	"io"
	"log"
)

func InitViper() {
	Viper = viper.New()
	Viper.SetConfigType("toml")
}

func ReadConfig(in io.Reader) {
	if err := Viper.ReadConfig(in); err != nil {
		log.Printf("viper readCoing：%+v", err)
	}
}
